/*
 * Copyright 2020 tu.cn All right reserved. This software is the
 * confidential and proprietary information of tu.cn ("Confidential
 * Information"). You shall not disclose such Confidential Information and shall
 * use it only in accordance with the terms of the license agreement you entered
 * into with Tu.cn
 */
package cn.zjitc.service;

import cn.zjitc.domian.Product;

import java.util.List;

/**
 * @author dell
 * @date 2020/7/3 8:39
 */
public interface ProductService {
    /**
     * 查询所有
     * @return
     */
    List<Product> findAll();

    /**
     * 添加商品
     * @param product
     */
    void addProduct(Product product);

    /**
     * 跟据商品名查找商品是否存在
     * @param name
     * @return
     */
    Product fingProductByName(String name);

    /**
     * 根据id删除
     * @param id
     */
    void delProduct(String id);

    /**
     * 根据id查找
     * @param id
     * @return
     */
    Product findProductById(String id);

    /**
     * 修改
     * @param product
     */
    void update(Product product);
}
